Native CMake integration#118
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a top-level CMake entrypoint to configure/build SimAI “natively” (without the existing wrapper scripts), primarily targeting the ns-3 simulator workflow and integrating Astra-sim sources into the ns-3 tree during configuration.
Changes:
- Introduces a new root
CMakeLists.txtto drive builds of the simulator (and optionally analytical/phy targets). - Adjusts
astra_ns3subproject CMake to only defaultCMAKE_BUILD_TYPEwhen unset. - Updates
.gitignoreto ignore additional build/config artifacts (including generic**/buildand**/cmake-cache).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| CMakeLists.txt | New root CMake configuration orchestrating Astra-sim + ns-3 build and creating a simulator symlink |
| astra-sim-alibabacloud/build/astra_ns3/CMakeLists.txt | Safer defaulting of CMAKE_BUILD_TYPE (doesn’t clobber user-provided value) |
| .gitignore | Adds ignores for config/build artifacts and introduces broad **/build / **/cmake-cache patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…o symlink/stubs generation for native ns3 headers
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…AI into cmake-integration
|
I have merged latest changes from master and implemented comments from copilot. |
- Move ns3‑specific logic into cmake/ns3.cmake - Replace manual MPI compiler path hacks with modern `find_package(MPI)` - Unify binary output under top‑level `bin/` via CMake custom targets
ba417ce to
1ad6730
Compare
|
I have better structured the CMakeFile tree and tested with all the three SimAI modes (analytical, phy, ns3); the old I think eventually we can entirely replace |
This creates a root CMakeLists that can be used to directly configure and build the project natively.
For instance:
This can be helpful for developing (code inspection features) and for future maintenance in general.
Works with PR aliyun/ns-3-alibabacloud#9 for the ns3 subproject.
(tested with simulator only)(supports all three modes: ns3, analytical, phy)